﻿using System;
using SharpSqlAnalyzer.nodes;
using SharpSqlAnalyzer.pp.processor.type.comm;
using SharpSqlAnalyzer.pp.utils;

namespace SharpSqlAnalyzer.pp.processor.type.declare
{
	// Token: 0x02000244 RID: 580
	public class DeclareVarItemAlignProcessor : AbstractProcessor
	{
		// Token: 0x060012FF RID: 4863 RVA: 0x0031BFF4 File Offset: 0x0031A1F4
		public override void process(TParseTreeNode nodeArg)
		{
			TDeclareVariableList tdeclareVariableList = nodeArg as TDeclareVariableList;
			if (tdeclareVariableList == null || tdeclareVariableList.size() == 0)
			{
				return;
			}
			int num = 0;
			for (int i = 0; i < tdeclareVariableList.size(); i++)
			{
				int length = tdeclareVariableList.getDeclareVariable(i).VariableName.startToken.astext.Length;
				if (length > num)
				{
					num = length;
				}
			}
			for (int j = 0; j < tdeclareVariableList.size(); j++)
			{
				TSourceToken startToken = tdeclareVariableList.getDeclareVariable(j).VariableName.startToken;
				int length2 = startToken.astext.Length;
				int num2 = num - length2;
				if (num2 > 0)
				{
					string str = Utils.createEmpty(num2);
					startToken.astext += str;
				}
			}
		}
	}
}
